home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / exmh-faq < prev    next >
Encoding:
Text File  |  1995-07-25  |  12.0 KB  |  285 lines

  1. Subject: exmh FAQ
  2. Newsgroups: comp.lang.tcl,comp.mail.mh
  3. From: welch@parc.xerox.com (Brent Welch)
  4. Date: 14 Jun 1994 17:45:11 GMT
  5.  
  6. Here are just a few Frequently Asked Questions about Exmh.
  7. This file is distributed along with exmh, but you may not
  8. have seen it or been responsible for the installation.
  9.  
  10. If you have other questions that you think might be good candidates
  11. for the FAQ, send them along to exmhbugs@parc.xerox.com - Thanks.
  12.  
  13.     Brent Welch
  14.  
  15. Frequently Asked Questions about EXMH
  16.  
  17. 1. Is it possible to get the cursor keys working in the editor?
  18. 1b. Can I paste with the middle mouse button?
  19. 2. How do I display ISO-8859 fonts so that my special characters show up?
  20. 2b. How do I insert special 8-bit characters (latin-1)
  21. 3. I can't get background incorporate to work. What am I doing wrong?
  22. 4. How do I start my X server so it does Xauthority right?
  23. 5. Where do I find Faces and Metamail packages?
  24. 6. How do you get an X-Face: line into your outgoing mail messages?
  25. 6b. How do you display an X-Face: header line?
  26. 7. Can I use EXMH as a news reader?
  27. 8. How do I change those default wheat-colors for the widgets in EXMH?
  28. 9. What's the difference between presort and multidrop inc-styles?
  29.  
  30. -------------------------------------------------------------------------
  31.  
  32. 1. Is it possible to get the cursor keys working in the editor?
  33.  
  34.     Use the Bind dialog to set additional keystroke bindings for various
  35.     editting functions.  For cursor keys, you first need to figure out
  36.     what their X Keysyms are.  I use the "xev" program for this.  Assuming
  37.     the keysyms are Up, Down, Left, and Right, then you'd add
  38.     <Key-Up> to the up1line function, etc.  The Bind dialog lets you
  39.     have multiple sequences for a function - just space separate them.
  40.     You may have to drag the entry widget with the middle mouse button
  41.     to make room to add stuff to the end.
  42.  
  43. 1b. Can I paste with the middle mouse button?
  44.  
  45.     Use the Bind dialog to do two things.  First, change the scrolling
  46.     binding away from Middle button.  This binding lets you "drag" a text
  47.     window around without having to hit the scrollbar.  So, change that
  48.     to right button or disable it altogether because the default is that
  49.     the middle button is used for this kind of scrolling.  Second, change
  50.     the selpaste binding to <Button-2> so you can paste with middle click.
  51.  
  52. 2. How do I display ISO-8859 fonts so that my special characters show up?
  53.  
  54.     Put an Xresource specification into your ~/.exmh-defaults file:
  55.     *Text*font: -*-lucida-*-*-*-*-*-*-*-*-*-*-iso8859-*
  56.     *Ftoc*Text*font: -*-lucida-*-*-*-*-10-*-*-*-*-*-iso8859-*
  57.  
  58. 2b. How do I insert special (8-bit) characters?
  59.  
  60.     The seditBind.tcl file has one binding already for <Alt-KeyPress>
  61.     that will work on some keyboards (DEC and IBM) european ones.
  62.     If you have a standard keyboard, I'd add the following lines to
  63.     your user.tcl hook file.  (Use Alt or Meta, whichever you prefer).
  64.     You can put these lines into User_Init in your user.tcl
  65.  
  66.     bind Entry <Meta-a> {%W insert insert \xe4}
  67.     bind Entry <Meta-A> {%W insert insert \xc4}
  68.     bind Entry <Meta-o> {%W insert insert \xf6}
  69.     bind Entry <Meta-O> {%W insert insert \xd6}
  70.     bind Entry <Meta-u> {%W insert insert \xfc}
  71.     bind Entry <Meta-U> {%W insert insert \xdc}
  72.     bind Entry <Meta-s> {%W insert insert \xdf}
  73.  
  74.     bind Text <Meta-a> {SeditInsert %W \xe4}
  75.     bind Text <Meta-A> {SeditInsert %W \xc4}
  76.     bind Text <Meta-o> {SeditInsert %W \xf6}
  77.     bind Text <Meta-O> {SeditInsert %W \xd6}
  78.     bind Text <Meta-u> {SeditInsert %W \xfc}
  79.     bind Text <Meta-U> {SeditInsert %W \xdc}
  80.     bind Text <Meta-s> {SeditInsert %W \xdf}
  81.  
  82. 3. I can't get background incorporate to work. What am I doing wrong?
  83.  
  84.     The most likely cause is that the TK send facility does not work for you
  85.     because of Xauthority issues.  "send" lets two TCL interpreters issue
  86.     commands to each other, and it uses X properties.  Begining with
  87.     TK 3.3, this also honors the Xauthority protocol, unless you compile
  88.     TK with -DNO_SECURITY.  You can test this by running "wish" and
  89.     trying out the following command:
  90.         send exmh {Exmh_Status "Hello, world!"}
  91.     If this fails, you have two options.  First, disable the background process
  92.     so that all periodic activity is done in the front-end.  Do this via
  93.     the preferences entry for Background Processing.  Or, better, learn how
  94.     to start your X server so that it does Xauthority right.
  95.  
  96.     Note that even if you set up Xauthority right, you need to
  97.     xhost -
  98.     to ensure that your xhost access list is empty.
  99.  
  100.     Another cause that might disable inc completely is lack of the MAILDROP
  101.     environment variable.  This should be set to the name of the spool
  102.     file that contains incoming mail (unless you are using POP).  The
  103.     latest Exmh will warn you about this and try to choose a default
  104.     value, but to be safe you should set this up properly.
  105.  
  106. 4. How do I start my X server so it does Xauthority right?
  107.  
  108.     The general picture of whats going on is this:
  109.     1) some program generates a magic cookie (arbitrary string) and writes
  110.     this to a file.
  111.     2) The name of this file is passed to the X server
  112.     3) The X server writes an entry for the DISPLAY into your ~/.Xauthority
  113.     file.
  114.     4) Xlib reads ~/.Xauthority when you create a window, and passes the
  115.     cookie value back to the X server.
  116.     
  117.     The specific details vary from server to server.
  118.  
  119.     For SunOS and openwin, you should just be able to start up with:
  120.  
  121.     openwin -auth magic-cookie
  122.  
  123.     Another person had luck with:
  124.  
  125.     BTW, the Xauthority stuff seems to work now. All I did was declare
  126.     and export XAUTHORITY from my .profile. I had't done it before since
  127.     the value ($HOME/.Xauthority) is supposed to be the default. We're
  128.     using XDM.
  129.  
  130.  
  131.     In more detail, here is what happens under the covers...
  132.  
  133.     if [ ! \( -d $HOME -a -w $HOME \) ]; then
  134.       echo "Warning: Can't write X authority file" 1>&2 ;
  135.       auth_args=""
  136.     else
  137.       authfname=$HOME/.xnews.`uname -n`$DISPLAY
  138.       ${OPENWINHOME}/lib/mkcookie $authfname -auth magic-cookie
  139.       auth_args="-auth $authfname"
  140.     fi ;
  141.     ${OPENWINHOME}/bin/xnews $auth_args $server_args $xnews_config_args ;;
  142.     
  143.     There is a more lengthy example given in the misc/Xauthority file
  144.     that comes with the exmh distribution.
  145.  
  146. 5. Where do I find Faces and Metamail packages?
  147.  
  148.     There are pointers to these packages at the end of the man page.
  149.  
  150. 6. How do you get an X-Face: line into your outgoing mail messages?
  151.  
  152.     The compface program that is part of the faces package will generate
  153.     the X-Face hex string for you.  Check its man page for details.
  154.     If you have a 48x48 X bitmap image in X bitmap .xbm format,
  155.     then you can tweak a little program that comes with exmh,
  156.     misc/myface.c, that re-writes the
  157.     bitmap into the format expected by compface.
  158.  
  159.     Then, MH understands templates for new mail, replies, and forwarded
  160.     messages.  These are the ~/Mail/components, ~/Mail/replcomps, and
  161.     ~/Mail/forwcomps files, respectively.  Here are some examples.  The
  162.     components file is straight-forward.  The replcomps file requires
  163.     some quoting of % and \ in X-Face hex string, plus some complete
  164.     magic to generate the in-lined message you are replying to.  See
  165.     the repl man page for the details.
  166.  
  167.     ---------cut here for sample components file-----------
  168. To: 
  169. Subject: 
  170. Fcc: outbox
  171. Cc: 
  172. X-Face: "HxE|?EnC9fVMV8f70H83&{fgLE.|FZ^$>@Q(yb#N,Eh~N]e&]=>r5~UnRml1:4EglY{9B+
  173.  :'wJq$@c_C!l8@<$t,{YUr4K,QJGHSvS~U]H`<+L*x?eGzSk>XH\W:AK\j?@?c1o<k;j'Ei/UL)!*0
  174.  ILwSR)J\bc)gjz!rrGQ2#i*f:M:ydhK}jp4dWQW?;0{,#iWrCV$4~%e/3)$1/D
  175.  
  176.  
  177. ----------------------------------
  178.     Brent Welch    Xerox-PARC
  179.     ------------end sample components file-----------------
  180.  
  181.     ---------cut here for replcomps------------------------
  182. %(lit)%(formataddr %<{reply-to}%|%<{from}%|%{sender}%>%>)\
  183. %<(nonnull)%(void(width))%(putaddr To: )\n%>\
  184. %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
  185. %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
  186. %<{subject}Subject: Re: %{subject}\n%>\
  187. %<{date}In-reply-to: %<(mbox{from})%(mbox{from})%|%(friendly{from})%>\
  188. 's message of \
  189. %<(nodate{date})%{date}%|%(tws{date})%>.%<{message-id}
  190.          %{message-id}%>\n%>\
  191. X-Face: "HxE|?EnC9fVMV8f70H83&{fgLE.|FZ^$>@Q(yb#N,Eh~N]e&]=>r5~UnRml1:4EglY{9B+
  192.  :'wJq$@c_C!l8@<$t,{YUr4K,QJGHSvS~U]H`<+L*x?eGzSk>XH\\W:AK\\j?@?c1o<k;j'Ei/UL)!*0
  193.  ILwSR)J\\bc)gjz!rrGQ2#i*f:M:ydhK}jp4dWQW?;0{,#iWrCV$4~%%e/3)$1/D
  194. Fcc: outbox\n
  195.  
  196.     --------------end sample replcomps file----------------
  197.  
  198. 6b. How do you display an X-Face: header line?
  199.  
  200.     Under the Faces preferences, set the X-Face pipeline to be similar to:
  201.     uncompface | ikon2xbm
  202.     (You might need absolute pathnames if these programs are not
  203.     otherwise on your PATH).
  204.     uncompface comes with the faces package.
  205.     ikon2xbm comes with exmh as misc/ikon2xbm.c
  206.     Just compile it with
  207.     cc -o ikon2xbm ikon2xbm.c
  208.  
  209.     Note, this is slower than I'd like, plus the results are not saved
  210.     anywhere.  The intended use of the X-Face header was that the mail
  211.     agent would update the facesaver database in the background using it.
  212.  
  213. 7. Can I use EXMH as a news reader?
  214.  
  215.     Well, it actually works ok, but there are various things that would
  216.     make it better at reading news.  To get started, just make a symbolic
  217.     link from your ~/Mail directory into the news spool file system.
  218.     This requires access (e.g., NFS) to the news spool file system, of course.
  219.     You can do it for a single newsgroup, i.e. clari.feature.dilbert.
  220.     My symlink looks like:
  221.     Mail/dilbert -> /net/news/news-1/news/spool/clari/feature/dilbert
  222.     Or, you can link into the interior of the news hierarchy.
  223.     You might run into a problem from the MH folders command that
  224.     limits it to about 300 folders.  Change the NFOLDERS constant in MH
  225.     src/h/mh.h from 300 to 30,000 and you shouldn't have any more trouble ;-)
  226.  
  227. 8. How do I change those default wheat-colors for the widgets in EXMH?
  228.  
  229.     (See also exmh.COLORS for more color schemes...)
  230.     Here is a set of Xresources that I use to get a grey-family for
  231.     my TK-based applications.  You can put this into your
  232.     ~/.exmh-defaults, or into your ~/.Xdefaults.  This works ok
  233.     on a monochrome screen, although buttons do not highlight
  234.     when you pass the mouse over them.
  235.  
  236. *activeBackground:            #efefef
  237. *activeForeground:            black
  238. *selector:                black
  239. *background:                #dfdfdf
  240. *foreground:                black
  241. *selectBackground:            #bfdfff
  242. *Scale.activeForeground:        #efefef
  243. *Scale.sliderForeground:        #dfdfdf
  244. *Scrollbar.foreground:            #dfdfdf
  245. *Scrollbar.activeForeground:        #efefef
  246. *Button.disabledForeground:        #7f7f7f
  247. *Checkbutton.disabledForeground:    #7f7f7f
  248. *Radiobutton.disabledForeground:    #7f7f7f
  249. *Menu.disabledForeground:        #7f7f7f
  250.  
  251. 9. What's the difference between presort and multidrop inc-styles?
  252.  
  253.     The main difference between presort and multidrop is: with
  254.     presort, you don't need a ~/.forward that pipes your messages to slocal
  255.     because exmh will run slocal for you.  The second difference is that
  256.     the presort scheme assumes that messages are completly routed into
  257.     folders, either with the + syntax (slocal patch required) or by
  258.     piping messages through rcvstore in the .maildelivery specification.
  259.     The multidrop scheme assumes you append messages to dropbox files
  260.     with the '>' or 'file' command in your .maildelivery file.
  261.  
  262.     Thus your options are:
  263.     1. use slocal in your .forward, 
  264.        pipe your messages to rcvstore in .maildelivery,
  265.        and have exmh do background flist updates.
  266.     2. use slocal in your .forward, 
  267.        append messages to files in .maildelivery,
  268.        specify files to folders mapping in .xmhcheck, 
  269.        and have exmh do background multidrop.
  270.     3. empty .forward, 
  271.        pipe your messages to rcvstore in your .maildelivery, 
  272.        and have exmh do background presort.
  273.     4. Note that the following DOES NOT WORK
  274.        empty .forward,
  275.        append messages to files in .maildelivery,
  276.        specify file to folder mapping in .xmhcheck, 
  277.        and have exmh do background presort.
  278.        WON'T WORK
  279.  
  280.  
  281. --
  282. ----------------------------------
  283.     Brent Welch    Xerox-PARC
  284.  
  285.